﻿
// ReSharper disable InconsistentNaming
using Gp.Scripts.Core;
using Gp.Scripts.GUI;
using UnityEngine;
using UnityEngine.UI;
using TMPro;
using NRFramework;

namespace Gp.Scripts.GUI 
{
    public class CommonPopupBase : GUIPanel
    {		protected TextMeshProUGUI mTxtTitle_TMPText;		protected TextMeshProUGUI mTxtDesc_TMPText;		protected Button mBtnConfirm_Button;		protected Button mBtnCancel_Button;
        protected override void OnBindCompsAndEvents() 
        {			mTxtTitle_TMPText = (TextMeshProUGUI)viewBehaviour.GetComponentByIndexs(0, 0);			mTxtDesc_TMPText = (TextMeshProUGUI)viewBehaviour.GetComponentByIndexs(1, 0);			mBtnConfirm_Button = (Button)viewBehaviour.GetComponentByIndexs(2, 0);			mBtnCancel_Button = (Button)viewBehaviour.GetComponentByIndexs(3, 0);			BindEvent(mBtnConfirm_Button);			BindEvent(mBtnCancel_Button);		}

        protected override void OnUnbindCompsAndEvents() 
        {			UnbindEvent(mBtnConfirm_Button);			UnbindEvent(mBtnCancel_Button);			mTxtTitle_TMPText = null;			mTxtDesc_TMPText = null;			mBtnConfirm_Button = null;			mBtnCancel_Button = null;		}
    }
}